﻿//-----------------------------------------------------------------------
// <copyright file="Link.cs" company="MKCoolsoft">
//     Copyright (c) mkcoolsoft. All rights reserved.
// </copyright>
// <author>Mario Kuhl</author>
// <revision>26.01.2014 Initial version</revision>
//-----------------------------------------------------------------------

namespace MKCoolsoft.GPXLib
{
    #region usings

    using System;
    using System.Collections.Generic;
    using System.Xml.Serialization;

    #endregion usings

    /// <summary>
    /// A link to an external resource (Web page, digital photo, video clip, etc) 
    /// with additional information. 
    /// </summary>
    public class Link
    {
        #region private fields

        /// <summary>
        /// Text of hyperlink.
        /// </summary>
        private string textField;

        /// <summary>
        /// Mime type of content (image/jpeg)
        /// </summary>
        private string typeField;

        /// <summary>
        /// URL of hyperlink.
        /// </summary>
        private string hrefField;

        #endregion private fields

        #region public properties

        /// <summary>
        /// Gets or sets Text from link.
        /// </summary>
        public string Text
        {
            get
            {
                return this.textField;
            }

            set
            {
                this.textField = value;
            }
        }

        /// <summary>
        /// Gets or sets Type from link.
        /// </summary>
        public string Type
        {
            get
            {
                return this.typeField;
            }

            set
            {
                this.typeField = value;
            }
        }

        /// <summary>
        /// Gets or sets <c>Href</c> from link.
        /// </summary>
        [XmlAttributeAttribute(DataType = "anyURI")]
        public string Href
        {
            get
            {
                return this.hrefField;
            }

            set
            {
                this.hrefField = value;
            }
        }

        #endregion public properties
    }
}
